# vim: filetype=yaml sw=2
version: '[% c("var/torbrowser_version") %]'
output_dir: release
link_input_files: 1

var:
  signed_status: unsigned
  publish_dir: '[% c("var/signed_status") %]/[% c("version") %]-[% c("var/torbrowser_build") %]'
  containers_target: with_containers

targets:
  browser-all:
    - browser-linux-x86_64
    - browser-linux-i686
    - browser-windows-i686
    - browser-windows-x86_64
    - browser-macos
    - browser-android-armv7
    - browser-android-x86
    - browser-android-x86_64
    - browser-android-aarch64
    - browser-src
  browser-all-desktop:
    - browser-linux-x86_64
    - browser-linux-i686
    - browser-windows-i686
    - browser-windows-x86_64
    - browser-macos
    - browser-src
  browser-all-android:
    - browser-android-armv7
    - browser-android-x86
    - browser-android-x86_64
    - browser-android-aarch64
  browser-android-armv7:
    var:
      browser-android-armv7: 1
  browser-android-x86:
    var:
      browser-android-x86: 1
  browser-android-x86_64:
    var:
      browser-android-x86_64: 1
  browser-android-aarch64:
    var:
      browser-android-aarch64: 1
  browser-linux-x86_64:
    var:
      browser-linux-x86_64: 1
  browser-linux-x86_64-asan:
    var:
      browser-linux-x86_64: 1
      asan-build: '-asan'
  browser-linux-i686:
    var:
      browser-linux-i686: 1
  browser-linux-arm64:
    var:
      browser-linux-arm64: 1
  browser-linux-armhf:
    var:
      browser-linux-armhf: 1
  browser-windows-i686:
    var:
      browser-windows-i686: 1
  browser-windows-x86_64:
    var:
      browser-windows-x86_64: 1
  browser-macos:
    var:
      browser-macos: 1
  browser-macos-x86_64:
    var:
      browser-macos-x86_64: 1
  browser-macos-aarch64:
    var:
      browser-macos-aarch64: 1
  browser-src:
    var:
      browser-src: '[% ! c("var/testbuild") %]'
  browser-src-testbuild:
    var:
      browser-src: 1

  notarget:
    - torbrowser
    - release
    - browser-all
    - browser-all-android
    - browser-all-desktop

  noversiondir:
    var:
      publish_dir: ''

  torbrowser:
    var:
      browser_type: torbrowser
  basebrowser:
    var:
      browser_type: basebrowser

  release:
    var:
      build_target: release

  nightly:
    output_dir: 'nightly'
    var:
      build_target: nightly
      publish_dir: '[% c("version") %]'

  alpha:
    output_dir: alpha
    var:
      build_target: alpha

  testbuild:
    output_dir: 'testbuild'
    var:
      testbuild: 1
      build_target: '[% c("var/browser_type") %]-testbuild'
      publish_dir: ''

  no_containers:
    var:
      containers_target: no_containers

  signed:
    var:
      signed_status: signed

  create_unsigned_incrementals:
    var:
      create_unsigned_incrementals: 1

input_files:

# Release
 - name: android-armv7
   project: browser
   enable: '[% c("var/browser-android-armv7") %]'
   target:
     - '[% c("var/containers_target") %]'
     - '[% c("var/build_target") %]'
     - '[% c("var/browser_type") %]-android-armv7'

 - name: android-x86
   project: browser
   enable: '[% c("var/browser-android-x86") %]'
   target:
     - '[% c("var/containers_target") %]'
     - '[% c("var/build_target") %]'
     - '[% c("var/browser_type") %]-android-x86'

 - name: android-x86_64
   project: browser
   enable: '[% c("var/browser-android-x86_64") %]'
   target:
     - '[% c("var/containers_target") %]'
     - '[% c("var/build_target") %]'
     - '[% c("var/browser_type") %]-android-x86_64'

 - name: android-aarch64
   project: browser
   enable: '[% c("var/browser-android-aarch64") %]'
   target:
     - '[% c("var/containers_target") %]'
     - '[% c("var/build_target") %]'
     - '[% c("var/browser_type") %]-android-aarch64'

 - name: linux-x86_64
   project: browser
   enable: '[% c("var/browser-linux-x86_64") %]'
   target:
     - '[% c("var/build_target") %]'
     - '[% c("var/browser_type") %]-linux-x86_64[% c("var/asan-build") %]'

 - name: linux-i686
   project: browser
   enable: '[% c("var/browser-linux-i686") %]'
   target:
     - '[% c("var/build_target") %]'
     - '[% c("var/browser_type") %]-linux-i686'

 - name: linux-arm64
   project: browser
   enable: '[% c("var/browser-linux-arm64") %]'
   target:
     - '[% c("var/build_target") %]'
     - '[% c("var/browser_type") %]-linux-arm64'

 - name: linux-armhf
   project: browser
   enable: '[% c("var/browser-linux-armhf") %]'
   target:
     - '[% c("var/build_target") %]'
     - '[% c("var/browser_type") %]-linux-armhf'

 - name: windows-i686
   project: browser
   enable: '[% c("var/browser-windows-i686") %]'
   target:
     - '[% c("var/build_target") %]'
     - '[% c("var/browser_type") %]-windows-i686'

 - name: windows-x86_64
   project: browser
   enable: '[% c("var/browser-windows-x86_64") %]'
   target:
     - '[% c("var/build_target") %]'
     - '[% c("var/browser_type") %]-windows-x86_64'

 - name: macos
   project: browser
   enable: '[% c("var/browser-macos") %]'
   target:
     - '[% c("var/build_target") %]'
     - '[% c("var/browser_type") %]-macos'

 # non-universal macos build
 - name: macos-x86_64
   project: browser
   enable: '[% c("var/browser-macos-x86_64") %]'
   target:
     - '[% c("var/build_target") %]'
     - '[% c("var/browser_type") %]-macos-x86_64'

 # non-universal macos build
 - name: macos-aarch64
   project: browser
   enable: '[% c("var/browser-macos-aarch64") %]'
   target:
     - '[% c("var/build_target") %]'
     - '[% c("var/browser_type") %]-macos-aarch64'

 - name: src-firefox
   project: firefox
   enable: '[% c("var/browser-src") %]'
   pkg_type: src-tarballs
   target:
     - '[% c("var/build_target") %]'
     - browser-src
     - '[% c("var/browser_type") %]'

steps:
  signtag:
    build_log: '-'
    debug: 0
    input_files: []
    signtag: '[% INCLUDE signtag %]'
  update_responses_config:
    build_log: '-'
    debug: 0
    input_files: []
    update_responses_config: '[% INCLUDE update_responses_config %]'
  create_update_responses_tar:
    build_log: '-'
    debug: 0
    input_files: []
    create_update_responses_tar: '[% INCLUDE create_update_responses_tar %]'
  hash_incrementals:
    build_log: '-'
    debug: 0
    input_files: []
    hash_incrementals: '[% INCLUDE hash_incrementals %]'
  dmg2mar:
    build_log: '-'
    debug: 0
    input_files: []
    dmg2mar: '[% INCLUDE dmg2mar %]'
